<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import ="service.*,java.util.*,bean.*" %>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>更新</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");
int id=Integer.parseInt(request.getParameter("id"));
String username=new String(request.getParameter("username"));
String password=new String(request.getParameter("password"));
Admin admin=new Admin(id,username,password);
int res =new AdminService().updatebyid(admin);
if(res>0)
	response.sendRedirect("do_query.jsp");
else
	out.print("更新失败");

%>
</body>
</html>